#define _CRT_SECURE_NO_WARNINGS

#include"DLinkList.h"

void Test1()
{
	ListNode* phead = NULL;
	phead = ListCreate();
	ListPushBack(phead, 6);
	ListPushBack(phead, 7);
	ListPushBack(phead, 8);
	ListPushBack(phead, 9);
	ListPushBack(phead, 0);
	ListPrint(phead);
	ListPopBack(phead);
	ListPrint(phead);
	ListPushFront(phead, 2);
	ListPushFront(phead, 3);
	ListPrint(phead);

}


void Test2()
{
	ListNode* phead = ListCreate();
	
	ListPushFront(phead, 1);
	ListPushFront(phead, 2);
	ListPushFront(phead, 3);
	ListPushFront(phead, 4);
	ListPushFront(phead, 5);
	ListPushFront(phead, 6);
	ListPushFront(phead, 7);
	ListPrint(phead);
	ListPopFront(phead);
	ListPrint(phead);
	ListNode* p = ListFind(phead, 4);
	ListInsert(p, 8);
	ListPrint(phead);
}

int main()
{
	Test2();
	return 0;
}